package com.jiyun.mapper;

import com.jiyun.pojo.entity.Tongji;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface TongjiMapper extends Mapper<Tongji> {
    @Select("select r.roleName as name,COUNT(u.roleId) as value from `user` as u,role as r where u.roleId=r.roleId GROUP BY u.roleId")
    List<Tongji> TongjiUserAndPaoTui();
    @Select("SELECT s.name as name,COUNT(o.statusid) AS value from `order` AS o, `status` AS s where o.statusid=s.statusid GROUP BY o.statusid")
    List<Tongji> TongjiStatusCount();
}
